﻿using Albatross.WPF.Common.ViewModels;
using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Albatross.SharePoint.Explorer.ViewModels {
	public class FileViewModel : ClientObjectViewModel{
		public FileViewModel(ClientContext context, string name, File File) : base(context, name, File) { }

		File File { get { return (File)ClientObject; } }

		public override string GetTreeItemTitle() {
			if(Name == string.Empty){
				return File.Name;
			} else {
				return Name;
			}
		}

		public override string GetContentTitle() {
			return string.Format("{0} - {1}", File.Name, File.ServerRelativeUrl);
		}
	}
}
